package com.commerce.addressbook;

import android.os.Environment;

import com.commerce.addressbook.Entity.Contacts;
import com.commerce.addressbook.Entity.DataBean;

import java.util.ArrayList;
import java.util.List;

import static com.commerce.addressbook.utlis.Format.intformat;

public class GlobalVariable {

    //电话列表
    private List<List<DataBean>> dataBeans = new ArrayList<>();

    //联系人信息

    private Contacts contacts = null;

    public List<List<DataBean>> getDataBeans() {
        return dataBeans;
    }

    public void setDataBeans(List<List<DataBean>> dataBeans) {
        this.dataBeans = dataBeans;
    }

    private GlobalVariable() {
    }

    public static  GlobalVariable getGlobalVariable() {

        return GlobalVariableHolder.globalVariable;
    }

    private static class GlobalVariableHolder{
        private static GlobalVariable globalVariable = new GlobalVariable();
    }

    public  Contacts getContacts() {
        return contacts;
    }

    public  void setContacts(Contacts contacts) {
        this.contacts = contacts;
    }


    public static String mTempPhotoPath(){
        return Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString()+intformat()+".jpeg";
    }
}
